package com.ysf.cn.springbootshrio.service.Impl;

import com.ysf.cn.springbootshrio.mapper.PermissionMapper;
import com.ysf.cn.springbootshrio.pojo.Permission;
import com.ysf.cn.springbootshrio.service.PermissionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author ysf
 * @date 2020/2/13 10:37
 */
@Service
public class PermissionServiceImpl implements PermissionService {

    @Resource
    private PermissionMapper permissionMapper;
    /**
     * 根据用户id查询用户权限信息
     * @param userId
     * @return
     */
    @Override
    public List<Permission> selectPermissionByUserId(Integer userId) {
        return permissionMapper.selectPermissionBuyUserId(userId);
    }
}
